import http from '@/utils/http'
export const getMenuListApi = async () => {
  const url = '/api/menulist'
  return http.get(url)
}

export const addMenuApi = async (data) => {
  const url = '/api/menuadd'
  return http.post(url,data)
}

export const getMenuApi = async (data) => {
  const url = '/api/menuinfo'
  return http.get(url,{params:{id:data}})
}

export const setMenuApi = async (data) => {
  const url = '/api/menuedit'
  return http.post(url,data)
}

export const delMenuApi = async (data) => {
  const url = '/api/menudelete'
  return http.post(url,{ id: data })
}

export const getOneApi = async (data) => {
  const url = '/api/menulist'
  return http.get(url,{params:{istree:data}})
}


